# -*-coding:utf-8-*-
# -*- coding: utf-8 -*-
# @Time    : 2022/11/11 14:36
# @Author  : gaojy
# @Site    : 
# @File    : mk.py
# @Software: PyCharm
import flask
# 实例化
from flask import Flask, request

t = Flask(__name__)


@t.route("/login", methods = ["post"])
def login():
    username = request.get_json()["username"]
    password = request.get_json()["password"]
    if username == "test1" and password == "test1":
        return {"message": "操作成功", "code": 200, "token": "mockabc"}
    else:
        return {"message": "用户名和密码不对", "code": 10091}


if __name__ == "__main__":
    t.run()
